<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>beginAjax</title>
<style type="text/css">

#result{
	width:400px;
	height:300px;
	border:1px solid #aaaaaa;
	border-radius:4px;
	box-shadow:2px 2px 4px #bbbbbb;
	margin-top:10px;
	
}

#btnCreate{
	width:400px;
	height:80px;
	border-radius:10px;
	bodx-shadow:2px 2px 4px #bbbbbb;
	
}

</style>
<script>
function init(){
	var rs=document.getElementById('result');
	var btn=document.getElementById('btnCreate');
	
	btn.onclick= function(){
		
		if(window.ActiveXObject){
			rs.innerHTML="IE 계열 브라우저입니다.";
		}else{
			
			rs.innerHTML="표준 브라우저입니다.";
		}
		
		xhr= new XMLHttpRequest();
		rs.innerHTML+="<p/><font color='red'>XMLHttpRequest 객체가 생성되었습니다.";
	}
}


</script>


</head>
<body>

<input type='button' value='XMLHttpRequest 객체 생성' id='btnCreate'>
<div id='result'></div>


<script>init();</script>
</body>
</html>